package objects;

import java.util.ArrayList;

import common.Constants;

public class MonsterGroup extends Entities
{

	private ArrayList<Monster> monsters = new ArrayList<Monster>();
	private short cellID;
	private long guid;
	private boolean isVisible;
	private byte orientation;
	private static int incrInstance = 0;
	
	public MonsterGroup()
	{
		incrInstance++;
		
		guid = incrInstance;
	}
	
	public MonsterGroup(short pCellID, byte pOrientation)
	{
		incrInstance++;
		
		guid = incrInstance;
		cellID = pCellID;
		orientation = pOrientation;
	}
	
	@Override
	public long getEntitieMapGuid() {
		return guid;
	}

	@Override
	public String getGmPacket() {
		return null;
	}

	@Override
	public short getCellID() {
		return cellID;
	}
	
	public void setCellID(short pCellID)
	{
		this.cellID = pCellID;
	}

	@Override
	public byte getOrientation() {
		return orientation;
	}
	
	public void setOrientation(byte pOrientation)
	{
		this.orientation = pOrientation;
	}

	@Override
	public boolean isVisible() {
		return isVisible;
	}

	@Override
	public byte getEntitieType() {
		return Constants.MAP_ENTITIE_TYPE_MOBGROUP;
	}

	@Override
	public void setEntitieMapGuid(long pGuid) {
		this.guid = pGuid;
	}

	@Override
	public void setVisible(boolean v) {
		this.isVisible = v;
	}
	
	public ArrayList<Monster> getMonsters()
	{
		return monsters;
	}
	
	public void addMonster(Monster pMonster)
	{
		if(pMonster != null)
			monsters.add(pMonster);
	}
	
}
